#ifndef CONFIGWINDOW_H
#define CONFIGWINDOW_H

#include <QWidget>
#include <QTimer>
#include <QTime>
#include <QSystemTrayIcon>

namespace Ui {
    class ConfigWindow;
}

class ConfigWindow : public QWidget
{
    Q_OBJECT

public:
    explicit ConfigWindow(QWidget *parent = 0);
    ~ConfigWindow();


    enum State
    {
        None,
        Pomodoro,
        Pause
    };





public slots:
    void stopTimer();
    void startTimer();

    void updateEverySecond();
    void timeoutPomodoro();
    void timeoutPause();
    void playAlert();


private:
    Ui::ConfigWindow *ui;

    QTimer *timer;
    QTimer *labelUpdater;

    State timerState;
    int remainingSecs;
    int pomodoroSecs;
    int pauseSecs;

    QSystemTrayIcon *trayIcon;


    void controlButtonsEnabling();

    void createTrayIcon();

    void updateIcon();
};

#endif // CONFIGWINDOW_H
